﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CalendarGroup.aspx.cs"
    Inherits="WMS6.Web.Billing.CalendarGroup" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>CalendarGroup</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" id="js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function() {
            initEditNewPage();
        }
        //弹出窗口选择科目
        function selectSubject() {
            var rtnValue = popModalWindow('../Billing/SubjectQuery.aspx?action=txtSubjectID', 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if (rtnValue != null && rtnValue.toString() != "") {
                document.getElementById("txtSubjectID").focus();
                document.getElementById("txtSubjectID").value = rtnValue;
            }
        }
        function confirmMsg(code) {
            if (code == "F9190_001") {
                if (confirm('<%=GetGlobalMsgResource("F9190_001") %>')) {
                    return true;
                }
                else {
                    return false;
                }
            }
            else if (code == "F9190_002") {
                if (confirm('<%=GetGlobalMsgResource("F9190_002") %>')) {
                    return true;
                }
                else {
                    return false;
                }
            }
           else if (code == "F9190_003") {
                if (confirm('<%=GetGlobalMsgResource("F9190_003") %>')) {
                    return true;
                }
                else {
                    return false;
                }
            }
        }      
    </script>

</head>
<body>
    <form id="F9191" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblOwner" runat="server" CssClass="label_header" Text="日历组" meta:resourcekey="lblOwner"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>"
                            Enabled="False" OnClick="btnGoBack_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"
                            Enabled="False" AccessKey="n" OnClick="btnNew_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>"
                            Enabled="False" AccessKey="s" OnClick="btnSave_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDelete%>"
                            Enabled="False" AccessKey="d" OnClientClick="javascript:if(confirmMsg('F9190_001'))return true; else return false;"
                            OnClick="btnDelete_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnCopy" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnCopy%>"
                            Enabled="False" AccessKey="c" OnClick="btnCopy_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
                </div>
                <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)"
                        id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">基本信息</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1">
                        </div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,2);"
                        id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server" meta:resourcekey="one2">&nbsp;明细信息&nbsp;</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2">
                        </div>
                    </div>
                </div>
                <div id="div_content">
                    <div id="con_one_1" style="display: block;">
                        <table width="720px" style="margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblCalendarGroupID" runat="server" CssClass="label" Text="日历组代码" meta:resourcekey="lblCalendarGroupID"></asp:Label><span
                                        class="must_input">*</span>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtCalendarGroupID" runat="server" CssClass="textbox" MaxLength="20"
                                        meta:resourcekey="txtCalendarGroupID"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblDesrc" runat="server" CssClass="label" Text="描述" meta:resourcekey="lblDesrc"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtDesrc" runat="server" CssClass="textbox" meta:resourcekey="txtDesrc"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="chkIsActive" runat="server" CssClass="checkbox" Text="是否启用" Checked="True"
                                        meta:resourcekey="chkIsActive" />
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_2" style="display: none;">
                        <table width="720px" style="margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnAddDetail" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnAddDetail%>"
                                                    OnClientClick="javascript:if(document.getElementById('hdnCalendarGroupID').value == ''){if(confirmMsg('F9190_002')) return true; else return false;}"
                                                    OnClick="btnAddDetail_Click" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnDeleteDetail" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDelete%>"
                                                    OnClientClick="javascript:if(confirmMsg('F9190_003')) return true; else return false;"
                                                    OnClick="btnDeleteDetail_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:GridView ID="gvCalendarGroup" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                            CssClass="gridview" OnRowDataBound="gvCalendarGroup_RowDataBound" DataKeyNames="LineID" oninit="gvCalendarGroup_Init" 
                                            AllowPaging="True" OnPageIndexChanging="gvCalendarGroup_PageIndexChanging" OnSorting="gvCalendarGroup_Sorting"
                                            meta:resourcekey="gvCalendarGroup">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <PagerStyle CssClass="GridViewPageStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                                    <ItemStyle CssClass="GridViewRowWidth_40" />
                                                </asp:BoundField>
                                                <asp:TemplateField meta:resourcekey="TemplateField">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvCalendarGroup');"
                                                            meta:resourcekey="CheckBox1" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvCalendarGroup');"
                                                            meta:resourcekey="CheckBox2" />
                                                    </FooterTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="LineID" HeaderText="行号" FooterText="行号" SortExpression="LineID"
                                                    meta:resourcekey="LineID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="开始日期" HeaderText="开始日期" SortExpression="StartTime"
                                                    meta:resourcekey="StartTime">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblStartTime" runat="server" Text='<%# GetPreferenceShortDate(Eval("StartTime").ToString()) %>'
                                                            meta:resourcekey="lblStartTime"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                                                </asp:TemplateField>
                                                <asp:TemplateField FooterText="结束日期" HeaderText="结束日期" SortExpression="EndTime" meta:resourcekey="EndTime">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblEndTime" runat="server" Text='<%# GetPreferenceShortDate(Eval("EndTime").ToString()) %>'
                                                            meta:resourcekey="lblEndTime"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="RateID" HeaderText="费率代码" FooterText="费率代码" SortExpression="RateID"
                                                    meta:resourcekey="RateID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="描述" HeaderText="描述" SortExpression="remark" meta:resourcekey="remark">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblRemark" runat="server" Text='<%# Eval("remark").ToString() %>'
                                                            meta:resourcekey="lblRemark"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <input type="hidden" id="hdnFlag" runat="server">
                    <input id="hdnLineID" runat="server" type="hidden"></input>
                    <input id="hdnCalendarGroupID" runat="server" type="hidden"></input>
                </input>
                </input> </input>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    </form>
</body>
</html>
